3.191 \(\int \frac{a+b \sec (e+f x)}{(c+d \sec (e+f x))^3} \, dx\)

Optimal. Leaf size=204 \[ \frac{\left (b c^3 \left (2 c^2+d^2\right )-a d \left (-5 c^2 d^2+6 c^4+2 d^4\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^3 f (c-d)^{5/2} (c+d)^{5/2}}-\frac{d \left (-5 a c^2 d+2 a d^3+3 b c^3\right ) \tan (e+f x)}{2 c^2 f \left (c^2-d^2\right )^2 (c+d \sec (e+f x))}-\frac{d (b c-a d) \tan (e+f x)}{2 c f \left (c^2-d^2\right ) (c+d \sec (e+f x))^2}+\frac{a x}{c^3} \]

[Out]

(a*x)/c^3 + ((b*c^3*(2*c^2 + d^2) - a*d*(6*c^4 - 5*c^2*d^2 + 2*d^4))*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sq
rt[c + d]])/(c^3*(c - d)^(5/2)*(c + d)^(5/2)*f) - (d*(b*c - a*d)*Tan[e + f*x])/(2*c*(c^2 - d^2)*f*(c + d*Sec[e
 + f*x])^2) - (d*(3*b*c^3 - 5*a*c^2*d + 2*a*d^3)*Tan[e + f*x])/(2*c^2*(c^2 - d^2)^2*f*(c + d*Sec[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.509632, antiderivative size = 204, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {3923, 4060, 3919, 3831, 2659, 208} \[ \frac{\left (b c^3 \left (2 c^2+d^2\right )-a d \left (-5 c^2 d^2+6 c^4+2 d^4\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^3 f (c-d)^{5/2} (c+d)^{5/2}}-\frac{d \left (-5 a c^2 d+2 a d^3+3 b c^3\right ) \tan (e+f x)}{2 c^2 f \left (c^2-d^2\right )^2 (c+d \sec (e+f x))}-\frac{d (b c-a d) \tan (e+f x)}{2 c f \left (c^2-d^2\right ) (c+d \sec (e+f x))^2}+\frac{a x}{c^3} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x])/(c + d*Sec[e + f*x])^3,x]

[Out]

(a*x)/c^3 + ((b*c^3*(2*c^2 + d^2) - a*d*(6*c^4 - 5*c^2*d^2 + 2*d^4))*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sq
rt[c + d]])/(c^3*(c - d)^(5/2)*(c + d)^(5/2)*f) - (d*(b*c - a*d)*Tan[e + f*x])/(2*c*(c^2 - d^2)*f*(c + d*Sec[e
 + f*x])^2) - (d*(3*b*c^3 - 5*a*c^2*d + 2*a*d^3)*Tan[e + f*x])/(2*c^2*(c^2 - d^2)^2*f*(c + d*Sec[e + f*x]))

Rule 3923

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Simp[(b*(
b*c - a*d)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1))/(a*f*(m + 1)*(a^2 - b^2)), x] + Dist[1/(a*(m + 1)*(a^2 -
 b^2)), Int[(a + b*Csc[e + f*x])^(m + 1)*Simp[c*(a^2 - b^2)*(m + 1) - (a*(b*c - a*d)*(m + 1))*Csc[e + f*x] + b
*(b*c - a*d)*(m + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && LtQ[m,
 -1] && NeQ[a^2 - b^2, 0] && IntegerQ[2*m]

Rule 4060

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) +
 (a_))^(m_), x_Symbol] :> Simp[((A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1))/(a*f*(m + 1
)*(a^2 - b^2)), x] + Dist[1/(a*(m + 1)*(a^2 - b^2)), Int[(a + b*Csc[e + f*x])^(m + 1)*Simp[A*(a^2 - b^2)*(m +
1) - a*(A*b - a*B + b*C)*(m + 1)*Csc[e + f*x] + (A*b^2 - a*b*B + a^2*C)*(m + 2)*Csc[e + f*x]^2, x], x], x] /;
FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]

Rule 3919

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(c*x)/a,
x] - Dist[(b*c - a*d)/a, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[
b*c - a*d, 0]

Rule 3831

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[1/(1 + (a*Sin[e
 + f*x])/b), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{a+b \sec (e+f x)}{(c+d \sec (e+f x))^3} \, dx &=-\frac{d (b c-a d) \tan (e+f x)}{2 c \left (c^2-d^2\right ) f (c+d \sec (e+f x))^2}-\frac{\int \frac{-2 a \left (c^2-d^2\right )-2 c (b c-a d) \sec (e+f x)+d (b c-a d) \sec ^2(e+f x)}{(c+d \sec (e+f x))^2} \, dx}{2 c \left (c^2-d^2\right )}\\ &=-\frac{d (b c-a d) \tan (e+f x)}{2 c \left (c^2-d^2\right ) f (c+d \sec (e+f x))^2}-\frac{d \left (3 b c^3-5 a c^2 d+2 a d^3\right ) \tan (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (c+d \sec (e+f x))}+\frac{\int \frac{2 a \left (c^2-d^2\right )^2-c \left (a d \left (4 c^2-d^2\right )-b c \left (2 c^2+d^2\right )\right ) \sec (e+f x)}{c+d \sec (e+f x)} \, dx}{2 c^2 \left (c^2-d^2\right )^2}\\ &=\frac{a x}{c^3}-\frac{d (b c-a d) \tan (e+f x)}{2 c \left (c^2-d^2\right ) f (c+d \sec (e+f x))^2}-\frac{d \left (3 b c^3-5 a c^2 d+2 a d^3\right ) \tan (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (c+d \sec (e+f x))}+\frac{\left (b c^3 \left (2 c^2+d^2\right )-a d \left (6 c^4-5 c^2 d^2+2 d^4\right )\right ) \int \frac{\sec (e+f x)}{c+d \sec (e+f x)} \, dx}{2 c^3 \left (c^2-d^2\right )^2}\\ &=\frac{a x}{c^3}-\frac{d (b c-a d) \tan (e+f x)}{2 c \left (c^2-d^2\right ) f (c+d \sec (e+f x))^2}-\frac{d \left (3 b c^3-5 a c^2 d+2 a d^3\right ) \tan (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (c+d \sec (e+f x))}+\frac{\left (b c^3 \left (2 c^2+d^2\right )-a d \left (6 c^4-5 c^2 d^2+2 d^4\right )\right ) \int \frac{1}{1+\frac{c \cos (e+f x)}{d}} \, dx}{2 c^3 d \left (c^2-d^2\right )^2}\\ &=\frac{a x}{c^3}-\frac{d (b c-a d) \tan (e+f x)}{2 c \left (c^2-d^2\right ) f (c+d \sec (e+f x))^2}-\frac{d \left (3 b c^3-5 a c^2 d+2 a d^3\right ) \tan (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (c+d \sec (e+f x))}+\frac{\left (b c^3 \left (2 c^2+d^2\right )-a d \left (6 c^4-5 c^2 d^2+2 d^4\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+\frac{c}{d}+\left (1-\frac{c}{d}\right ) x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{c^3 d \left (c^2-d^2\right )^2 f}\\ &=\frac{a x}{c^3}+\frac{\left (2 b c^5-6 a c^4 d+b c^3 d^2+5 a c^2 d^3-2 a d^5\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^3 (c-d)^{5/2} (c+d)^{5/2} f}-\frac{d (b c-a d) \tan (e+f x)}{2 c \left (c^2-d^2\right ) f (c+d \sec (e+f x))^2}-\frac{d \left (3 b c^3-5 a c^2 d+2 a d^3\right ) \tan (e+f x)}{2 c^2 \left (c^2-d^2\right )^2 f (c+d \sec (e+f x))}\\ \end{align*}

Mathematica [A]  time = 1.31107, size = 267, normalized size = 1.31 \[ \frac{\sec ^2(e+f x) (a+b \sec (e+f x)) (c \cos (e+f x)+d) \left (-\frac{c d \left (-6 a c^2 d+3 a d^3+4 b c^3-b c d^2\right ) \sin (e+f x) (c \cos (e+f x)+d)}{(c-d)^2 (c+d)^2}-\frac{2 \left (a d \left (5 c^2 d^2-6 c^4-2 d^4\right )+b c^3 \left (2 c^2+d^2\right )\right ) (c \cos (e+f x)+d)^2 \tanh ^{-1}\left (\frac{(d-c) \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{\left (c^2-d^2\right )^{5/2}}+\frac{c d^2 (b c-a d) \sin (e+f x)}{(c-d) (c+d)}+2 a (e+f x) (c \cos (e+f x)+d)^2\right )}{2 c^3 f (a \cos (e+f x)+b) (c+d \sec (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x])/(c + d*Sec[e + f*x])^3,x]

[Out]

((d + c*Cos[e + f*x])*Sec[e + f*x]^2*(a + b*Sec[e + f*x])*(2*a*(e + f*x)*(d + c*Cos[e + f*x])^2 - (2*(b*c^3*(2
*c^2 + d^2) + a*d*(-6*c^4 + 5*c^2*d^2 - 2*d^4))*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(d + c*Co
s[e + f*x])^2)/(c^2 - d^2)^(5/2) + (c*d^2*(b*c - a*d)*Sin[e + f*x])/((c - d)*(c + d)) - (c*d*(4*b*c^3 - 6*a*c^
2*d - b*c*d^2 + 3*a*d^3)*(d + c*Cos[e + f*x])*Sin[e + f*x])/((c - d)^2*(c + d)^2)))/(2*c^3*f*(b + a*Cos[e + f*
x])*(c + d*Sec[e + f*x])^3)

________________________________________________________________________________________

Maple [B]  time = 0.091, size = 1063, normalized size = 5.2 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e))/(c+d*sec(f*x+e))^3,x)

[Out]

2/f*a/c^3*arctan(tan(1/2*f*x+1/2*e))-6/f/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2*d^2/(c-d)/(c^2+
2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a-1/f/c/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2*d^3/(c-d)/(c^2+2
*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a+2/f/c^2/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2*d^4/(c-d)/(c^2+
2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a+4/f*c/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2*d/(c-d)/(c^2+2*c
*d+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)/((c+d)*(c-d))^(1/2)*arcta
nh(tan(1/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2))*b*d^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))/(c+d*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.74749, size = 2479, normalized size = 12.15 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))/(c+d*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

[1/4*(4*(a*c^8 - 3*a*c^6*d^2 + 3*a*c^4*d^4 - a*c^2*d^6)*f*x*cos(f*x + e)^2 + 8*(a*c^7*d - 3*a*c^5*d^3 + 3*a*c^
3*d^5 - a*c*d^7)*f*x*cos(f*x + e) + 4*(a*c^6*d^2 - 3*a*c^4*d^4 + 3*a*c^2*d^6 - a*d^8)*f*x - (2*b*c^5*d^2 - 6*a
*c^4*d^3 + b*c^3*d^4 + 5*a*c^2*d^5 - 2*a*d^7 + (2*b*c^7 - 6*a*c^6*d + b*c^5*d^2 + 5*a*c^4*d^3 - 2*a*c^2*d^5)*c
os(f*x + e)^2 + 2*(2*b*c^6*d - 6*a*c^5*d^2 + b*c^4*d^3 + 5*a*c^3*d^4 - 2*a*c*d^6)*cos(f*x + e))*sqrt(c^2 - d^2
)*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 - 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e)
 + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) - 2*(3*b*c^6*d^2 - 5*a*c^5*d^3 - 3*b*c^4*d^4
+ 7*a*c^3*d^5 - 2*a*c*d^7 + (4*b*c^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 + 3*c^5*d^6 - c^3*d^8)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \sec{\left (e + f x \right )}}{\left (c + d \sec{\left (e + f x \right )}\right )^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))/(c+d*sec(f*x+e))**3,x)

[Out]

Integral((a + b*sec(e + f*x))/(c + d*sec(e + f*x))**3, x)

________________________________________________________________________________________

Giac [B]  time = 1.55178, size = 644, normalized size = 3.16 \begin{align*} \frac{\frac{{\left (2 \, b c^{5} - 6 \, a c^{4} d + b c^{3} d^{2} + 5 \, a c^{2} d^{3} - 2 \, a d^{5}\right )}{\left (\pi \left \lfloor \frac{f x + e}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (-2 \, c + 2 \, d\right ) + \arctan \left (-\frac{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}{\sqrt{-c^{2} + d^{2}}}\right )\right )}}{{\left (c^{7} - 2 \, c^{5} d^{2} + c^{3} d^{4}\right )} \sqrt{-c^{2} + d^{2}}} + \frac{{\left (f x + e\right )} a}{c^{3}} + \frac{4 \, b c^{4} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 6 \, a c^{3} d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 3 \, b c^{3} d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 5 \, a c^{2} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - b c^{2} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 3 \, a c d^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 2 \, a d^{5} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 4 \, b c^{4} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 6 \, a c^{3} d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 3 \, b c^{3} d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 5 \, a c^{2} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + b c^{2} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 3 \, a c d^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 2 \, a d^{5} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}{{\left (c^{6} - 2 \, c^{4} d^{2} + c^{2} d^{4}\right )}{\left (c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - c - d\right )}^{2}}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))/(c+d*sec(f*x+e))^3,x, algorithm="giac")

[Out]

((2*b*c^5 - 6*a*c^4*d + b*c^3*d^2 + 5*a*c^2*d^3 - 2*a*d^5)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(-2*c + 2*d) +
 arctan(-(c*tan(1/2*f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((c^7 - 2*c^5*d^2 + c^3*d^4)*sqr
t(-c^2 + d^2)) + (f*x + e)*a/c^3 + (4*b*c^4*d*tan(1/2*f*x + 1/2*e)^3 - 6*a*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 - 3*
b*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 + 5*a*c^2*d^3*tan(1/2*f*x + 1/2*e)^3 - b*c^2*d^3*tan(1/2*f*x + 1/2*e)^3 + 3*a
*c*d^4*tan(1/2*f*x + 1/2*e)^3 - 2*a*d^5*tan(1/2*f*x + 1/2*e)^3 - 4*b*c^4*d*tan(1/2*f*x + 1/2*e) + 6*a*c^3*d^2*
tan(1/2*f*x + 1/2*e) - 3*b*c^3*d^2*tan(1/2*f*x + 1/2*e) + 5*a*c^2*d^3*tan(1/2*f*x + 1/2*e) + b*c^2*d^3*tan(1/2
*f*x + 1/2*e) - 3*a*c*d^4*tan(1/2*f*x + 1/2*e) - 2*a*d^5*tan(1/2*f*x + 1/2*e))/((c^6 - 2*c^4*d^2 + c^2*d^4)*(c
*tan(1/2*f*x + 1/2*e)^2 - d*tan(1/2*f*x + 1/2*e)^2 - c - d)^2))/f